﻿#include<iostream>
using namespace std;


void reverse_string(char* start, char* end) {
	char tmp = *start;
	*start = *end;
	*end = tmp;
	if (start + 1 < end - 1) {
		reverse_string(start + 1, end - 1);
	}
}

int main() {
	char str[10] = "abcdefg";

	cout<<"逆置前的顺序："<<str;
	reverse_string(str, str + strlen(str) - 1);
	cout<<"逆置后的顺序："<< str;

	return 0;
}

